<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:fn="http://java.sun.com/jsp/jstl/functions"
	xmlns:c="http://java.sun.com/jsp/jstl/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:plcf="http://www.powerlogic.com.br/plcf"
	xmlns:plct="http://www.powerlogic.com.br/plct"
	xmlns:tr="http://myfaces.apache.org/trinidad"
	xmlns:trh="http://myfaces.apache.org/trinidad/html">
	
	<f:loadBundle basename="ApplicationResources" var="msg" />

	<c:set var="pAncoraAction" value="#{requestScope.plcURLComBarra}" />
	<c:if test="#{fn:startsWith(pAncoraAction,'/')}">
		<c:set var="pAncoraAction" value="#{fn:substringAfter(pAncoraAction,'/')}" />
	</c:if>
	<c:set var="pAncoraAction" value="\##{pAncoraAction}" />

	<c:if test="#{requestScope.exibeAjudaPlc =='S' and 
		((not empty requestScope.urlAjudaOperacao and requestScope.urlAjudaOperacao!='#') or
 	  	(not empty requestScope.urlAjudaGlossario and requestScope.urlAjudaGlossario!='#') or
    	(not empty requestScope.urlAjudaConceito and requestScope.urlAjudaConceito!='#'))}">
		<c:set var="urlIconeEstiloImprimir" value="text-align:center;background-image: url('#{request.contextPath}/res-plc/midia/form-ajuda.png'); background-position: left; background-repeat: no-repeat; padding-left: 5px; width: 20px;" />
		<button	class="botao_menu ui-state-default plc-botao" 
				onclick="janelaPainel(document.getElementById('plc-ajuda')); return false" 
				style="background-image: url('#{request.contextPath}/res-plc/midia/form-ajuda.png'); background-color: transparent; border: 0; background-repeat: no-repeat; width: 20px; height:20px;">
		</button>

	</c:if>
	<div id="plc-ajuda" class="plc-painel" style="visibility: hidden">
		<h1 style="text-align:center;">#{msg['jcompany.botaoajuda.ajuda']}
			<span class="fechar" onclick="janelaPainel(document.getElementById('plc-ajuda'));">X</span>
		</h1>
		<c:if test="#{not empty requestScope.urlAjudaOperacao and requestScope.urlAjudaOperacao!='#'}">
			<h2>#{msg['jcompany.botaoajuda.operacao']}</h2>
			<p>#{msg['jcompany.botaoajuda.operacao.detalhes']}</p>
			<c:if test="#{fn:startsWith(requestScope.urlAjudaOperacao,'http:')}">
				<input type="button" value="#{msg['jcompany.botaoajuda.queroajuda']}"
						onClick="window.open('#{requestScope.urlAjudaOperacao}#{pAncoraAction}','Ajuda','')" />
			</c:if>
			<c:if test="#{!fn:startsWith(requestScope.urlAjudaOperacao,'http:')}">
				<input type="button"
					value="#{msg['jcompany.botaoajuda.queroajuda']}"
					onClick="window.open('#{request.contextPath}#{requestScope.urlAjudaOperacao}#{pAncoraAction}','Ajuda','')" />
			</c:if>
		</c:if> 
		<c:if test="#{not empty requestScope.urlAjudaGlossario and requestScope.urlAjudaGlossario!='#'}">
			<h2>#{msg['jcompany.botaoajuda.glossario']}</h2>
			<p>#{msg['jcompany.botaoajuda.glossario.detalhes']}</p>
			<c:if test="#{fn:startsWith(requestScope.urlAjudaGlossario,'http:')}">
				<input type="button"
					value="#{msg['jcompany.botaoajuda.queroajuda']}"
					onClick="window.open('#{requestScope.urlAjudaGlossario}','Ajuda','')" />
			</c:if>
			<c:if test="#{!fn:startsWith(requestScope.urlAjudaGlossario,'http:')}">
				<input type="button"
					value="#{msg['jcompany.botaoajuda.queroajuda']}"
					onClick="window.open('#{request.contextPath}#{requestScope.urlAjudaGlossario}','Ajuda','')" />
			</c:if>
		</c:if> 
		<c:if test="#{not empty requestScope.urlAjudaConceito and requestScope.urlAjudaConceito!='#'}">
			<h2>#{msg['jcompany.botaoajuda.conceito']}</h2>
			<p>#{msg['jcompany.botaoajuda.conceito.detalhes']}</p>
			<c:if test="#{fn:startsWith(requestScope.urlAjudaConceito,'http:')}">
				<input type="button"
					value="#{msg['jcompany.botaoajuda.queroajuda']}"
					onClick="window.open('#{requestScope.urlAjudaConceito}','Ajuda','')" />
			</c:if>
			<c:if test="#{!fn:startsWith(requestScope.urlAjudaConceito,'http:')}">
				<input type="button"
					value="#{msg['jcompany.botaoajuda.queroajuda']}"
					onClick="window.open('#{request.contextPath}#{requestScope.urlAjudaConceito}','Ajuda','')" />
			</c:if>
		</c:if>
	</div>

</ui:composition>